package com.zxl.mytest5;

import java.util.HashMap;
import java.util.Map;

public class TestMap {
    
    public static <T> void main(String[] args) {
//        Map<TestKey<T>, T> map = new HashMap<TestKey<T>, T>();
//        TestKey<String> key1 = new TestKey<String>();
//        key1.setT("123");
        Map<String, TestKey<String>> map = new HashMap<String, TestKey<String>>();
        TestKey<String> key1 = new TestKey<String>("abc");
        map.put("123", key1);
        TestKey<String> key2 = map.get("123");
        map.remove("123");
        System.out.println(key2.getT());
    }
}
